import os

def get_dir_size(dir_name):
    folder_size = 0
    for t in os.walk(dir_name):
        for file_path in t[2]:
            folder_size += os.path.getsize(os.path.join(t[0], file_path))

    return folder_size

